#pragma once
#include <SDL.h>
#include "Map.h"
#include "DrawableObjectManager.h"
#include "UpdateableObjectManager.h"
#include "WaveInteractorManager.h"

class TowerBase;
class Ammo;
class IClickable;

class Arena
{
	Map map;
	DrawableObjectManager drawableObjects;

	UpdateableObjectManager updateableObjects;
	WaveInteractorManager waveInteractors;
	Manager<IClickable> clickableObjects;
	Manager<Wave> waves;
	Manager<void> memoryHolder;

public:

	Arena(void);
	~Arena(void);

	void drawArena(SDL_Renderer * renderer);
	void updateArena();

	void addTower(TowerBase * tower);
	void removeTower(TowerBase * tower);

	void addAmmo(Ammo * ammo);
	void removeAmmo(Ammo * ammo);

	void addWave(Wave * wave);
	void removeWave(Wave * wave);

	bool getMapTile(int x,int y);

	void loadMapTexture(const char * fileName);
	void loadMapData(const char * fileName);
	void loadRoad(const char * fileName);

	void tryInteract(int x,int y);


};

